// Draggable Dialog SCSS with theme support

// Common styles for both themes
.draggable-dialog {
  position: fixed;
  width: 70%;
  min-width: 800px;
  max-height: calc(100vh - 80px); /* 考虑顶部限制 */
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

// Theme-specific styles
.theme-black {
  .draggable-dialog {
    background: var(--bg-color);
    color: var(--text-color);
  }

  .dialog-header {
    padding: 15px 20px;
    border-bottom: 1px solid #363e4f;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-hover-color);
    border-radius: 4px 4px 0 0;
    user-select: none; /* 防止拖动时选中文本 */
  }

  .dialog-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
  }

  .close-btn {
    cursor: pointer;
    font-size: 16px;
    color: #909399;
    
    &:hover {
      color: var(--color-primary);
    }
  }

  .dialog-body {
    padding: 20px;
    flex: 1;
    overflow: auto;
  }

  .search-area {
    margin-bottom: 20px;
  }

  .search-form {
    display: flex;
    justify-content: space-between;
  }

  .table-area {
    margin-bottom: 20px;
  }

  .pagination {
    margin-top: 15px;
    text-align: right;
  }

  .dialog-footer {
    padding: 15px 20px;
    border-top: 1px solid #363e4f;
    text-align: right;
  }

  /* 行点击效果 */
  .el-table .current-row {
    cursor: pointer;
    background-color: var(--bg-hover-color);
  }
}

.theme-white {
  .draggable-dialog {
    background: var(--bg-color);
    color: var(--text-color);
  }

  .dialog-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ebeef5;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-hover-color);
    border-radius: 4px 4px 0 0;
    user-select: none; /* 防止拖动时选中文本 */
  }

  .dialog-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color-secondary);
  }

  .close-btn {
    cursor: pointer;
    font-size: 16px;
    color: var(--text-color-secondary);
    
    &:hover {
      color: var(--color-primary);
    }
  }

  .dialog-body {
    padding: 20px;
    flex: 1;
    overflow: auto;
  }

  .search-area {
    margin-bottom: 20px;
  }

  .search-form {
    display: flex;
    justify-content: space-between;
  }

  .table-area {
    margin-bottom: 20px;
  }

  .pagination {
    margin-top: 15px;
    text-align: right;
  }

  .dialog-footer {
    padding: 15px 20px;
    border-top: 1px solid #ebeef5;
    text-align: right;
  }

  /* 行点击效果 */
  .el-table .current-row {
    cursor: pointer;
    background-color: var(--bg-hover-color);
  }
}
